import httpInstance from '@/utils/http'

// 获取充值列表
export async function getRechargeListAPI (size, current) {
  try {
    const res = httpInstance.post('/api/recharge', {
      size,
        current
  })
    return res
}
  catch (error) {
    console.log(error)
  }
}

// 充值
export async function rechargeAPI ({userId,balance}) {
  try {
    const res = httpInstance.post('/api/recharge/create', {
      userId,
      balance
    })
    return res
}
  catch (error) {
    console.log(error)
  }
}